a = 300
print(id(a))
b = a
print(id(b))
print(a is b)
print('------------')

b = b + 1
print(id(b))
print(a is b)
print('------------')

b = b - 1
print(id(b))
print(a is b)
print(a == b)
print('------------')

c = 256  # 257 False!
d = c
d = d + 1
print(c is d)
d = d - 1
print(c is d)
print('------------')

e = -5  # -6 False!
f = e
f = f + 1
f = f - 1
print(e is f)
print('------------')

str_1 = 'abcde'
str_2 = 'abc' + 'de'
print(str_1 is str_2)

str_3 = '$&特殊符号'
str_4 = '$&特殊符号'
print(str_3 is str_4)
print(id(str_3))
print(id(str_4))
print('------------')

list_1 = [1, 3, 400, 2000]
list_2 = list_1
print(list_1 is list_2)
list_2.append(3)
print(list_2)
print(list_1)
print(list_1 is list_2)
list_2 = list_2 + [35, 680]  # 开辟新空间，放入[1,3,400,2000]和[35, 680]
print(list_2)
print(list_1)